<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <!-- React核心库 -->
  <script src="../build/react.min.js"></script>
  <!-- React-DOM提供与DOM相关的功能  -->
  <script src="../build/react-dom.min.js"></script>
  <!-- Browser.js 的作用是将 JSX 语法转为 JavaScript 语法 -->
  <script src="../build/browser.min.js"></script>
</head>
<body>
<script type="text/babel">
  var Input = React.createClass({
    getInitialState: function () {
      return {value: 'Hello!'};
    },
    handleChange: function (event) {
      this.setState({value: event.target.value});
    },
    render: function () {
      var value = this.state.value;
      return (
        <div>
          <input type="text" value={value} onChange={this.handleChange}/>
          <p>{value}</p>
        </div>
      )
    }
  });

  ReactDOM.render(<Input/>, document.body);
</script>
</body>
</html>